#include "ser.hpp"
using namespace Server;

static void Usage(string proc)//输入提示
{
    cout << "\nUsage:\n\t" << proc << " local_port\n\n";
}

// ./udpServer port
int main(int argc, char *argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(-1);
    }
    uint16_t port = atoi(argv[1]);
    // string ip = argv[1];

    std::unique_ptr<udpServer> u_server(new udpServer(port));

    u_server->initServer();
    u_server->start();

    return 0;
}